import { defineStore } from 'pinia'
// import router from '@/router'
// import { login } from '@/api/user.js'
// // import md5 from 'md5'
// // import { TOKEN } from '@/constant/index.js'
// import { ElMessage } from 'element-plus'
// import { isCheckTimeout, setTimeStamp } from '@/utils/auth.js'
// import { usePermissionStore } from './permission'

export const useUserStore = defineStore(
  'userStore',
  () => {
    const token = ref('')
    // 微信用户信息
    const userInfo = ref(null)
    return { token, userInfo }
  },
  {
    persist: {
      paths: ['token']
    }
  }
)
